home *** CD-ROM | disk | FTP | other *** search
/ Atari Mega Archive 1 / Atari Mega Archive - Volume 1.iso / telecomm / unitmacs.lzh / BBSDIAL.MAC next >
Text File  |  1990-02-19  |  3KB  |  63 lines

  1. # This is a general purpose BBS auto-dial.  Edit modem codes, login, and setup
  2. # files for your purposes.  Remember...macro must not exceed 4k, speed of code
  3. # transmission is determined by transfer rate in ASCII transfer menu.
  4. # Control-C can abort between commands.
  5. me('Loading Uniterm set up File') w(10) 
  6. loadsetup('uniterm.set') w(10) 
  7. # Following are modem codes:
  8. se('atz\r\n') w(10) se('ats7=17\r\n') w(10) se('atx4\r\n') 
  9. # This macro will redial w/prompt for retry number. 
  10. me('Dialing            BBS.  Will re-dial w/prompt for retries') w(10) 
  11. se('atdt       \r\n') w(05) set(1,1) set(2,0) 
  12. # Following is looking for first message from online to respond to. 
  13. if(!get('CONNECT',21)) ju(1) 
  14. :7 
  15. # Put log-on codes here. Put prompt text in "get", response in "send".
  16.   ge('          ',10) w(05) se('    ') 
  17.   ge('            ',10) me('                 ') w(05) se('     ') 
  18.   ge('Enter ID Number',15) w(20) se('       \r\n') 
  19.   ge('Enter Your Password:',15) w(05) se('     \r\n') 
  20. #Start history and exit. 
  21.   history(1) me('History recording is ON') w(20) exit(0) 
  22. :1 
  23. # 1st fail and re-dial message. 
  24.   ec('\r\n') ec('Failed!\r\n') w(05)
  25.   if(!input('Retries?  Enter #1-?+Ret. or Cancel')) ec('Quit!\n') exit(0) 
  26. # Check to see if $T is "0". Yes=quit, No=go on. 
  27.   if(com($T,'0')) ec('Quit.  FINISHED!\r\n') exit(0) 
  28. # Use # in $T to set re-try counter. 
  29.   set(1,.$T) 
  30. # place number in "Wait" command 3 seconds less than re-dial timeout. 
  31.   me('Re-dial in 30 seconds.') w(270) 
  32. :2 
  33. # Re-dial count, display, and check follows: @1= retry countdown @2=retry# 
  34. # "$T"=current retry display count. 
  35. # Display total remaining user re-tries on next line: 
  36.   ec("@1) ec(' re-dial remains:\r\n') w(05) 
  37.   set(1,add(@1,-1)) set(2,add(@2,1)) con('RETRY# ',"@2') ec($T) ec('\r\n') 
  38.   me('Re-dialing Cave Creek BBS. Cntrl-C aborts. NOW!') w(30) 
  39.   me('Dialing...') send('atdt       \r\n') 
  40. # Timeout for re-dial and success/fail.  "ju(4)"=fail 
  41.   if(!ge('CONNECT',21)) ec('\r\n') ju(4) 
  42. # If success, will return to log-in code near beginning. 
  43.   ju(7) 
  44. :4 
  45. # Look for count in @1 for "0". If not, re-dial. 
  46. # If so, prompt for more retries. 
  47.   if(com("@1','0')) ca(5) 
  48. # Failed and redial message for all until last prompt. 
  49.   ec('Failed!\r\n') w(10) se('\n') me('Re-dial in 30 sec.') w(270) ju(2) 
  50. :5 
  51. # Prompt to try again or stop and end macro. 
  52.   ec('Failed!  More retries?\r\n') w(05) se('\n') 
  53. # User clicks "OK" will loop re-dial routine. 
  54. # Prompt for re-try #. "set" for variable int. @1 to # entered by user. 
  55. # If "cancel is clicked, message, and end. 
  56.   if(input('Retries failed. Try again? Enter #-RET.')) ju(6) 
  57.   ec('ALL RETRIES FAILED! FINISHED.\r\n') w(10) exit(0) 
  58. :6 
  59. # Check to see if $T is "0". Yes=quit, No=go on. 
  60.   if(com($T,'0')) ec('Quit.  FINISHED!\r\n') exit(0) 
  61. # Make "set" for variable "@1" user number. 
  62.   w(05) set(1,.$T) ju(2)
  63.